import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

// 获取登录用户的基本信息
export const getUserInfo = () => {
  return request({
    url: '/sys/profile',
    method: 'post'
  })
}

// 获取登录用户的基本信息
export const getUserDetailById = (userId) => {
  return request({
    url: `/sys/user/${userId}`,
    method: 'GET'
  })
}

